package com.github.pig.training.service;

import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.github.pig.common.util.Query;
import com.github.pig.common.vo.UserVO;
import com.github.pig.training.entity.TrainingStudent;
import com.baomidou.mybatisplus.service.IService;
import com.github.pig.common.util.R;
import com.baomidou.mybatisplus.plugins.Page;

import java.util.Map;

/**
 * <p>
 * 学员信息 服务类
 * </p>
 *
 * @author andrew
 * @since 2018-06-16
 */
public interface ITrainingStudentService extends IService<TrainingStudent> {
    /**
     *  跟进
     * @param fid
     * @param userName
     * @return
     */
    R<Boolean> sFollowUp(int fid,String userName);

    /**
     * 跟进
     *  杨北平   2018-06-26
     *
     * @param obj
     * @param user
     * @return
     */
    R<Boolean> addFlowup(Object obj, UserVO user);


    /**
     *
     * 定时检查跟进天数是否大于最大天数
     *
     */
    public void checkDayNum();

    /**
     * 修改学生状态
     * @param id
     * @param state
     * @return
     */
    R<Boolean> updState(int id ,int state);

    /**
     * 效验学生信息
     */
    R<Boolean> checkInformation(String str);


    /**
     * 条件分页查询
     * @param query
     * @param userId
     * @param condition
     * @return
     */
    Page selectWithRolePage(Query query,int userId,String condition);

    /**
     * 条件查询通用
     */
    EntityWrapper getEwByCondition(Map<String,Object> map);

}
